package cn.kevin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;

@Configuration
@SpringBootApplication(exclude= {
        DataSourceAutoConfiguration.class,
        XADataSourceAutoConfiguration.class,
        TransactionAutoConfiguration.class,
        JtaAutoConfiguration.class,
        QuartzAutoConfiguration.class})
@ComponentScan(basePackages={
        "cn.gx.demo.controller",
        "cn.gx.demo.service",
        "cn.gx.demo.dao",
        "cn.gx.kevin.config",
        "cn.gx.kevin.controller",
        "cn.gx.kevin.service",
        "cn.gx.kevin.dao"
})
@ImportResource(value = {"classpath:spring-context.xml"})
@PropertySource("classpath:internal.properties")
public class App
{
    public static void main( String[] args )
    {
        try{
            SpringApplication.run(App.class, args);
            System.out.println( "SpringApplication is started ^_^ !" );
        }catch (Exception x){
            x.printStackTrace();
        }
    }
}